﻿import QtQuick 2.0
import QtQuick.Window 2.2
import "../../js/UI.js" as Style
import "../common"
BaseDialog{
    signal sureORcancel(var index);
    MouseArea{
        anchors.fill: parent
        onClicked: {

        }
    }
    Rectangle{
        z:10
        width: m_root_id.width - (Style.LeftScale + Style.RightScale) * 4 * m_lineValue
        height: 3.6 * m_lineValue + 4
        radius: m_lineValue*0.2
        anchors.centerIn: parent;
        color: "white"
        Rectangle{
            width: parent.width*0.8
            height: parent.height*0.68
            anchors.left: parent.left
            anchors.leftMargin: 0.1*parent.width
            Column{
                width: parent.width
                height: childrenRect.height
                anchors.centerIn: parent
                spacing: 0.1*m_lineValue
                Item{
                    width: parent.width
                    height: childrenRect.height
                    AText{
                        text:qsTr("%1").arg("你已加入10个房间")
                        font.pointSize: 18
                        wrapMode:Text.WordWrap
                        anchors.centerIn: parent
                    }
                }
                Item{
                    width: parent.width
                    height: childrenRect.height
                    AText{
                        text:qsTr("%1").arg("请离开某个房间后再加入")
                        font.pointSize: 18
                        wrapMode:Text.WordWrap
                        anchors.centerIn: parent
                    }
                }
            }
        }
        RadiusBotton{
            id:sureTr
            width: parent.width*0.5
            height:0.32 * parent.height
            anchors.bottom: parent.bottom
            anchors.left: parent.left
            m_text: "确定"
            btnEnable: false
            onCanvasClicked:{
                sureORcancel(0)
            }
        }
        RadiusBotton{
            width: parent.width*0.5
            height:0.32 * parent.height
            anchors.bottom: parent.bottom
            anchors.right: parent.right
            m_text: "取消"
            btnEnable: true
            onCanvasClicked:{
                sureORcancel(1)
            }
        }
        SplitLine{
            width: parent.width
            anchors.top: sureTr.top
            anchors.left: parent.left
        }
        Vertical_Line{
            height: sureTr.height
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.bottom: parent.bottom
        }
    }

}

